package entity;

import lombok.NoArgsConstructor;
import lombok.ToString;

import java.io.Serializable;
/**
 * @autor tg.si@188.com
 * @project xg22
 * @date 2024/3/26
 */
@ToString
@NoArgsConstructor
public class Department implements Comparable<Department>, Serializable {
    private Long id;
    private String description;
    private String no;
    private  String remarks;
    private School school;
    public Department(Long id,String description, String no, String remarks, School school) {
        this(description, no, remarks, school);
        this.id = id;
    }
    public Department(String description, String no, String remarks, School school) {
        this(description,no, remarks);
        this.school = school;
    }
    public Department(String description, String no, String remarks) {
        this.description = description;
        this.no = no;
        this.remarks = remarks;
    }
    public Long getId() {
        return id;
    }
    public void setId(Long id) {
        this.id = id;
    }
    public String getDescription() {
        return description;
    }
    public void setDescription(String description) {
        this.description = description;
    }
    public String getNo() {
        return no;
    }
    public void setNo(String no) {
        this.no = no;
    }
    public String getRemarks() {
        return remarks;
    }
    public void setRemarks(String remarks) {
        this.remarks = remarks;
    }
    public School getSchool() {
        return school;
    }
    public void setSchool(School school) {
        this.school = school;
    }
    @Override
    public int compareTo(Department o) {
        return this.no.compareTo(o.no);
    }
}
